import Vue from 'vue'
import Vuex from 'vuex'
// import regTeleFrom from './modules/regTeleFrom'
import {BACKUPS} from './types/xtype'

Vue.use(Vuex)

export default new Vuex.Store({
    // modeules: {
    //     regTeleFrom
    // },
    state: {
        websocketState: false,
        regButtn: false,
        operationLog: '',
        regTeleFrom: {
            jiemaCode: '',
            jiemaAccount: '',
            jiemaPassWord: '',
            newType: '',
            userName: '',
            userPassword: '',
            nameType: '',
            kashangId: '',
            regCount: 1,
            slider: 1
        }
    },
    mutations: {
        [BACKUPS] (state, regData) {
          state.regTeleFrom = regData
        }
    },
    actions: {
        backups ({ commit }, data) {
            commit(BACKUPS, data)
        }
    }
})
